Skip to content

fix(react-form-start): replace deprecated inputValidator with validator#2230

Open
smorimoto wants to merge 1 commit into
TanStack:mainfrom
smorimoto:fix/replace-inputvalidator-with-validator
Open

fix(react-form-start): replace deprecated inputValidator with validator#2230
smorimoto wants to merge 1 commit into
TanStack:mainfrom
smorimoto:fix/replace-inputvalidator-with-validator

Conversation

@smorimoto

@smorimoto smorimoto commented Jul 2, 2026

Copy link
Copy Markdown

Summary

TanStack Start has deprecated createServerFn().inputValidator() in favour of .validator(). Projects using @tanstack/react-form-start were seeing a build-time deprecation warning from the Start compiler.

This PR updates the library, example, and SSR documentation to use the new API, and bumps the @tanstack/react-start peer dependency to ^1.168.27, which includes the validator() method.

Changes

  • Replace .inputValidator() with .validator() in createServerValidate.tsx
  • Update the TanStack Start example and SSR guide
  • Bump @tanstack/react-start to ^1.168.27 in react-form-start and the example
  • Refresh pnpm-lock.yaml and add minimumReleaseAgeExclude entries for the updated TanStack packages

Test plan

  • Built @tanstack/react-form and @tanstack/react-form-start successfully
  • Verify the deprecation warning no longer appears when running the TanStack Start example

Summary by CodeRabbit

  • Bug Fixes
    • Updated form and server validation flows to use the current TanStack Start validation API, keeping POST request validation working as expected.
  • Documentation
    • Refreshed the SSR “Start integration” guide to match the latest validation syntax.
  • Chores
    • Bumped TanStack Start package versions in the React form/start packages and the related example setup.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 82f18455-7207-407b-a935-ed40868b6fea

📥 Commits

Reviewing files that changed from the base of the PR and between 9c8f0d1 and f25ed02.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • docs/framework/react/guides/ssr.md
  • examples/react/tanstack-start/package.json
  • examples/react/tanstack-start/src/utils/form.tsx
  • packages/react-form-start/package.json
  • packages/react-form-start/src/createServerValidate.tsx
✅ Files skipped from review due to trivial changes (4)
  • examples/react/tanstack-start/package.json
  • docs/framework/react/guides/ssr.md
  • packages/react-form-start/package.json
  • examples/react/tanstack-start/src/utils/form.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/react-form-start/src/createServerValidate.tsx

📝 Walkthrough

Walkthrough

Renames the .inputValidator(...) server function chain method to .validator(...) in the SSR docs example, the tanstack-start example app, and createServerValidate.tsx, and bumps @tanstack/react-start version constraints in the example and package manifests.

Changes

Validator rename and dependency updates

Layer / File(s) Summary
Rename validator chain method
packages/react-form-start/src/createServerValidate.tsx, examples/react/tanstack-start/src/utils/form.tsx, docs/framework/react/guides/ssr.md
The server function chain method used for validating incoming request data is renamed from .inputValidator(...) to .validator(...), with unchanged validation logic in each location.
Dependency version bumps
examples/react/tanstack-start/package.json, packages/react-form-start/package.json
@tanstack/react-start version constraints bumped from ^1.134.9 to ^1.168.27 in the example dependencies and in the package's devDependencies and peerDependencies.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, but it does not follow the template and omits the Checklist and Release Impact sections. Add the template's Checklist and Release Impact sections, including Contributing guide/test confirmation and whether a changeset is needed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main API rename in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​tanstack/​react-start@​1.168.27991008498100

View full report

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

TanStack Start has deprecated createServerFn().inputValidator() in favour
of .validator(). Update the react-form-start package, example, and SSR docs
accordingly, and bump the @tanstack/react-start peer dependency to ^1.168.27
where the new API is available.
@smorimoto smorimoto force-pushed the fix/replace-inputvalidator-with-validator branch from 9c8f0d1 to f25ed02 Compare July 3, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant